// 分类定义
export const categories = {
  expense: [
    { id: 'food', name: '餐饮', icon: '🍜' },
    { id: 'transport', name: '交通', icon: '🚗' },
    { id: 'shopping', name: '购物', icon: '🛍️' },
    { id: 'entertainment', name: '娱乐', icon: '🎮' },
    { id: 'housing', name: '住房', icon: '🏠' },
    { id: 'medical', name: '医疗', icon: '💊' },
    { id: 'education', name: '教育', icon: '📚' },
    { id: 'other', name: '其他', icon: '📌' }
  ],
  income: [
    { id: 'salary', name: '工资', icon: '💰' },
    { id: 'bonus', name: '奖金', icon: '🎁' },
    { id: 'investment', name: '投资', icon: '📈' },
    { id: 'parttime', name: '兼职', icon: '💼' },
    { id: 'redpacket', name: '红包', icon: '🧧' },
    { id: 'other-income', name: '其他', icon: '💸' }
  ]
}

// 获取分类信息
export const getCategoryInfo = (categoryId) => {
  const allCategories = [...categories.expense, ...categories.income]
  return allCategories.find(cat => cat.id === categoryId) || { name: '未知', icon: '❓' }
}
